<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>SessionCallbackBuilder (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="SessionCallbackBuilder (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.ext.media2</a></div>
<h2 title="Class SessionCallbackBuilder" class="title">Class SessionCallbackBuilder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">SessionCallbackBuilder</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Builds a <code>MediaSession.SessionCallback</code> with various collaborators.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback</code></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.AllowedCommandProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides allowed commands for <code>MediaController</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.CustomCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.CustomCommandProvider</a></span></code></th>
<td class="colLast">
<div class="block">Callbacks for querying what custom commands are supported, and for handling a custom command
 when a controller sends it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.DefaultAllowedCommandProvider.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.DefaultAllowedCommandProvider</a></span></code></th>
<td class="colLast">
<div class="block">Default implementation of <a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.AllowedCommandProvider</code></a> that behaves as follows:

 
   Accepts connection requests from controller if any of the following conditions are met:
       
         Controller is in the same package as the session.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.DisconnectedCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.DisconnectedCallback</a></span></code></th>
<td class="colLast">
<div class="block">Callback for handling controller disconnection.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.MediaIdMediaItemProvider.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.MediaIdMediaItemProvider</a></span></code></th>
<td class="colLast">
<div class="block">A <a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.MediaItemProvider</code></a> that creates media items containing only a media ID.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.MediaItemProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides the <code>MediaItem</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.PostConnectCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.PostConnectCallback</a></span></code></th>
<td class="colLast">
<div class="block">Callback for handling extra initialization after the connection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.RatingCallback</a></span></code></th>
<td class="colLast">
<div class="block">Callback receiving a user rating for a specified media id.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SessionCallbackBuilder.SkipCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.SkipCallback</a></span></code></th>
<td class="colLast">
<div class="block">Callback receiving skip backward and skip forward.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_SEEK_TIMEOUT_MS">DEFAULT_SEEK_TIMEOUT_MS</a></span></code></th>
<td class="colLast">
<div class="block">Default timeout value for <a href="#setSeekTimeoutMs(int)"><code>setSeekTimeoutMs(int)</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.ext.media2.SessionPlayerConnector)">SessionCallbackBuilder</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
                      <a href="SessionPlayerConnector.html" title="class in com.google.android.exoplayer2.ext.media2">SessionPlayerConnector</a>&nbsp;sessionPlayerConnector)</code></th>
<td class="colLast">
<div class="block">Creates a new builder.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>androidx.media2.session.MediaSession.SessionCallback</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#build()">build</a></span>()</code></th>
<td class="colLast">
<div class="block">Builds <code>MediaSession.SessionCallback</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAllowedCommandProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.AllowedCommandProvider)">setAllowedCommandProvider</a></span>&#8203;(<a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.AllowedCommandProvider</a>&nbsp;allowedCommandProvider)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.AllowedCommandProvider</code></a> to provide allowed commands for controllers.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomCommandProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.CustomCommandProvider)">setCustomCommandProvider</a></span>&#8203;(<a href="SessionCallbackBuilder.CustomCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.CustomCommandProvider</a>&nbsp;customCommandProvider)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.CustomCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.CustomCommandProvider</code></a> to handle incoming custom commands.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDisconnectedCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.DisconnectedCallback)">setDisconnectedCallback</a></span>&#8203;(<a href="SessionCallbackBuilder.DisconnectedCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.DisconnectedCallback</a>&nbsp;disconnectedCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.DisconnectedCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.DisconnectedCallback</code></a> to handle cleaning up controller.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFastForwardIncrementMs(int)">setFastForwardIncrementMs</a></span>&#8203;(int&nbsp;fastForwardMs)</code></th>
<td class="colLast">
<div class="block">Sets the fast forward increment in milliseconds.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaItemProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.MediaItemProvider)">setMediaItemProvider</a></span>&#8203;(<a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.MediaItemProvider</a>&nbsp;mediaItemProvider)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.MediaItemProvider</code></a> that will convert media ids to <code>MediaItems</code>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPostConnectCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.PostConnectCallback)">setPostConnectCallback</a></span>&#8203;(<a href="SessionCallbackBuilder.PostConnectCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.PostConnectCallback</a>&nbsp;postConnectCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.PostConnectCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.PostConnectCallback</code></a> to handle extra initialization after the connection.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRatingCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.RatingCallback)">setRatingCallback</a></span>&#8203;(<a href="SessionCallbackBuilder.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.RatingCallback</a>&nbsp;ratingCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.RatingCallback</code></a> to handle user ratings.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRewindIncrementMs(int)">setRewindIncrementMs</a></span>&#8203;(int&nbsp;rewindMs)</code></th>
<td class="colLast">
<div class="block">Sets the rewind increment in milliseconds.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSeekTimeoutMs(int)">setSeekTimeoutMs</a></span>&#8203;(int&nbsp;seekTimeoutMs)</code></th>
<td class="colLast">
<div class="block">Sets the timeout in milliseconds for fast forward and rewind operations, or <code>0</code> for no
 timeout.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSkipCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.SkipCallback)">setSkipCallback</a></span>&#8203;(<a href="SessionCallbackBuilder.SkipCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.SkipCallback</a>&nbsp;skipCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="SessionCallbackBuilder.SkipCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.SkipCallback</code></a> to handle skip backward and skip forward.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="DEFAULT_SEEK_TIMEOUT_MS">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_SEEK_TIMEOUT_MS</h4>
<pre>public static final&nbsp;int DEFAULT_SEEK_TIMEOUT_MS</pre>
<div class="block">Default timeout value for <a href="#setSeekTimeoutMs(int)"><code>setSeekTimeoutMs(int)</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.DEFAULT_SEEK_TIMEOUT_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.ext.media2.SessionPlayerConnector)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SessionCallbackBuilder</h4>
<pre>public&nbsp;SessionCallbackBuilder&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
                              <a href="SessionPlayerConnector.html" title="class in com.google.android.exoplayer2.ext.media2">SessionPlayerConnector</a>&nbsp;sessionPlayerConnector)</pre>
<div class="block">Creates a new builder.

 <p>The builder uses the following default values:

 <ul>
   <li><a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.AllowedCommandProvider</code></a>: <a href="SessionCallbackBuilder.DefaultAllowedCommandProvider.html" title="class in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.DefaultAllowedCommandProvider</code></a>
   <li>Seek timeout: <a href="#DEFAULT_SEEK_TIMEOUT_MS"><code>DEFAULT_SEEK_TIMEOUT_MS</code></a>
   <li>
 </ul>

 Unless stated above, <code>null</code> or <code>0</code> would be used to disallow relevant features.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>sessionPlayerConnector</code> - A session player connector to handle incoming calls from the
     controller.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setRatingCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.RatingCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRatingCallback</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setRatingCallback&#8203;(@Nullable
                                                <a href="SessionCallbackBuilder.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.RatingCallback</a>&nbsp;ratingCallback)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.RatingCallback</code></a> to handle user ratings.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ratingCallback</code> - A rating callback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onSetRating(MediaSession, ControllerInfo, String, Rating)</code>, 
<code>MediaController.setRating(String, Rating)</code></dd>
</dl>
</li>
</ul>
<a id="setCustomCommandProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.CustomCommandProvider)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomCommandProvider</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setCustomCommandProvider&#8203;(@Nullable
                                                       <a href="SessionCallbackBuilder.CustomCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.CustomCommandProvider</a>&nbsp;customCommandProvider)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.CustomCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.CustomCommandProvider</code></a> to handle incoming custom commands.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>customCommandProvider</code> - A custom command provider.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onCustomCommand(MediaSession, ControllerInfo, SessionCommand,
     Bundle)</code>, 
<code>MediaController.sendCustomCommand(SessionCommand, Bundle)</code></dd>
</dl>
</li>
</ul>
<a id="setMediaItemProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.MediaItemProvider)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaItemProvider</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setMediaItemProvider&#8203;(@Nullable
                                                   <a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.MediaItemProvider</a>&nbsp;mediaItemProvider)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.MediaItemProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.MediaItemProvider</code></a> that will convert media ids to <code>MediaItems</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItemProvider</code> - The media item provider.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onCreateMediaItem(MediaSession, ControllerInfo, String)</code>, 
<code>MediaController.addPlaylistItem(int, String)</code>, 
<code>MediaController.replacePlaylistItem(int, String)</code>, 
<code>MediaController.setMediaItem(String)</code>, 
<code>MediaController.setPlaylist(List, MediaMetadata)</code></dd>
</dl>
</li>
</ul>
<a id="setAllowedCommandProvider(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.AllowedCommandProvider)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAllowedCommandProvider</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setAllowedCommandProvider&#8203;(@Nullable
                                                        <a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.AllowedCommandProvider</a>&nbsp;allowedCommandProvider)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.AllowedCommandProvider.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.AllowedCommandProvider</code></a> to provide allowed commands for controllers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>allowedCommandProvider</code> - A allowed command provider.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
</dl>
</li>
</ul>
<a id="setSkipCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.SkipCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSkipCallback</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setSkipCallback&#8203;(@Nullable
                                              <a href="SessionCallbackBuilder.SkipCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.SkipCallback</a>&nbsp;skipCallback)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.SkipCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.SkipCallback</code></a> to handle skip backward and skip forward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skipCallback</code> - The skip callback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onSkipBackward(MediaSession, ControllerInfo)</code>, 
<code>MediaSession.SessionCallback.onSkipForward(MediaSession, ControllerInfo)</code>, 
<code>MediaController.skipBackward()</code>, 
<code>MediaController.skipForward()</code></dd>
</dl>
</li>
</ul>
<a id="setPostConnectCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.PostConnectCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPostConnectCallback</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setPostConnectCallback&#8203;(@Nullable
                                                     <a href="SessionCallbackBuilder.PostConnectCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.PostConnectCallback</a>&nbsp;postConnectCallback)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.PostConnectCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.PostConnectCallback</code></a> to handle extra initialization after the connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>postConnectCallback</code> - The post connect callback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onPostConnect(MediaSession, ControllerInfo)</code></dd>
</dl>
</li>
</ul>
<a id="setDisconnectedCallback(com.google.android.exoplayer2.ext.media2.SessionCallbackBuilder.DisconnectedCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDisconnectedCallback</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setDisconnectedCallback&#8203;(@Nullable
                                                      <a href="SessionCallbackBuilder.DisconnectedCallback.html" title="interface in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder.DisconnectedCallback</a>&nbsp;disconnectedCallback)</pre>
<div class="block">Sets the <a href="SessionCallbackBuilder.DisconnectedCallback.html" title="interface in com.google.android.exoplayer2.ext.media2"><code>SessionCallbackBuilder.DisconnectedCallback</code></a> to handle cleaning up controller.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>disconnectedCallback</code> - The disconnected callback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onDisconnected(MediaSession, ControllerInfo)</code></dd>
</dl>
</li>
</ul>
<a id="setRewindIncrementMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRewindIncrementMs</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setRewindIncrementMs&#8203;(int&nbsp;rewindMs)</pre>
<div class="block">Sets the rewind increment in milliseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rewindMs</code> - The rewind increment in milliseconds. A non-positive value will cause the
     rewind to be disabled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onRewind(MediaSession, MediaSession.ControllerInfo)</code>, 
<a href="#setSeekTimeoutMs(int)"><code>setSeekTimeoutMs(int)</code></a></dd>
</dl>
</li>
</ul>
<a id="setFastForwardIncrementMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFastForwardIncrementMs</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setFastForwardIncrementMs&#8203;(int&nbsp;fastForwardMs)</pre>
<div class="block">Sets the fast forward increment in milliseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fastForwardMs</code> - The fast forward increment in milliseconds. A non-positive value will
     cause the fast forward to be disabled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>MediaSession.SessionCallback.onFastForward(MediaSession, MediaSession.ControllerInfo)</code>, 
<a href="#setSeekTimeoutMs(int)"><code>setSeekTimeoutMs(int)</code></a></dd>
</dl>
</li>
</ul>
<a id="setSeekTimeoutMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeekTimeoutMs</h4>
<pre class="methodSignature">public&nbsp;<a href="SessionCallbackBuilder.html" title="class in com.google.android.exoplayer2.ext.media2">SessionCallbackBuilder</a>&nbsp;setSeekTimeoutMs&#8203;(int&nbsp;seekTimeoutMs)</pre>
<div class="block">Sets the timeout in milliseconds for fast forward and rewind operations, or <code>0</code> for no
 timeout. If a timeout is set, controllers will receive an error if the session's call to <code>SessionPlayer.seekTo(long)</code> takes longer than this amount of time.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>seekTimeoutMs</code> - A timeout for <code>SessionPlayer.seekTo(long)</code>. A non-positive value will wait
     forever.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder.</dd>
</dl>
</li>
</ul>
<a id="build()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre class="methodSignature">public&nbsp;androidx.media2.session.MediaSession.SessionCallback&nbsp;build()</pre>
<div class="block">Builds <code>MediaSession.SessionCallback</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new callback for a media session.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
